<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">

<title>class RBS::Collection::Sources::Git - rbs: Ruby Standard Library Documentation</title>


<script src="../../../js/navigation.js" defer></script>
<script src="../../../js/search.js" defer></script>
<script src="../../../js/search_index.js" defer></script>
<script src="../../../js/searcher.js" defer></script>
<script src="../../../js/darkfish.js" defer></script>

<script src="../../../js/jquery-3.2.0.min.js"></script>

<script src="../../../js/vue.min.js"></script>
<script src="../../../js/js.cookie.min.js"></script>

<link href="../../../css/fonts.css" rel="stylesheet">
<link id='rdoccss' href="../../../css/rdoc.css" rel="stylesheet">
<link href="../../../css/carbon17.css" rel="stylesheet">

<script type="text/javascript">
  var rdoc_rel_prefix = "../../../";
  var index_rel_prefix = "../../../";
  var darkModeCsseHref = "../../../css/rdoc-dm.css"
  var defaultModeCssHref = "../../../css/rdoc.css"
  // var cssDarkmode = Cookies.get('darkmode');
  
  if( Cookies.get("darkmode") == "true") {
	$('#rdoccss').attr("href", darkModeCsseHref);
}

//  https://cssdeck.com/blog/simple-jquery-stylesheet-switcher/

document.write('<style type="text/css">body{display:none}</style>');

</script>


</head>
<body id="top" role="document" class="class">
  <!-- this is class.html -->

  <div id='actionbar' >
    <div class='wrapper mdiv'>
      <ul class='grids g0'></ul>
    </div> 
    <!-- VERSION HEADER for 3.3.0.preview2 NOT FOUND -->
  </div> <!-- end action bar -->

  <div class='wrapper hdiv'>

    


    <nav id='vapp' role="navigation">
    <div id="project-navigation">
      <div id="home-section" role="region" title="Quick navigation" class="nav-section">
  <h2><a href="../../../index.html" rel="home">Home</a></h2>

  <div id="table-of-contents-navigation"  >
    <a href="../../../table_of_contents.html#pages">Pages</a>
    <a href="../../../table_of_contents.html#classes">Classes</a>
    <a href="../../../table_of_contents.html#methods">Methods</a>
  </div>
</div>

      <div id="search-section" role="search" class="project-section initially-hidden">
  <form action="#" method="get" accept-charset="utf-8">
    <div id="search-field-wrapper">
      <input id="search-field" role="combobox" aria-label="Search"
             aria-autocomplete="list" aria-controls="search-results"
             type="text" name="search" placeholder="Search" spellcheck="false"
             title="Type to search, Up and Down to navigate, Enter to load">
    </div>

    <ul id="search-results" aria-label="Search Results"
        aria-busy="false" aria-expanded="false"
        aria-atomic="false" class="initially-hidden"></ul>
  </form>
</div>

    </div>


    

    <button id='toggleThing' @click="toggleNav()" >Show/hide navigation</button>
    <div :class="isOpen ? 'block' : 'hidden' " id='toggleMe'>
      <div id="class-metadata">
        
        
<div id="parent-class-section" class="nav-section">
  <h3>Parent</h3>

  <p class="link">Object
</div>

        
<div id="includes-section" class="nav-section">
  <h3>Included Modules</h3>

  <ul class="link-list">
    <li><a class="include" href="Base.html">RBS::Collection::Sources::Base</a>
  </ul>
</div>

        
        
<!-- Method Quickref -->
<div id="method-list-section" class="nav-section">
  <h3>Methods</h3>

  <ul class="link-list" role="directory">
    <li ><a href="#method-c-new">::new</a>
    <li ><a href="#method-i-_install">#_install</a>
    <li ><a href="#method-i-commit_hash-3F">#commit_hash?</a>
    <li ><a href="#method-i-cp_r">#cp_r</a>
    <li ><a href="#method-i-format_config_entry">#format_config_entry</a>
    <li ><a href="#method-i-gem_repo_dir">#gem_repo_dir</a>
    <li ><a href="#method-i-gems_versions">#gems_versions</a>
    <li ><a href="#method-i-git">#git</a>
    <li ><a href="#method-i-git-3F">#git?</a>
    <li ><a href="#method-i-git_dir">#git_dir</a>
    <li ><a href="#method-i-has-3F">#has?</a>
    <li ><a href="#method-i-install">#install</a>
    <li ><a href="#method-i-load_metadata">#load_metadata</a>
    <li ><a href="#method-i-manifest_of">#manifest_of</a>
    <li ><a href="#method-i-metadata_content">#metadata_content</a>
    <li ><a href="#method-i-need_to_fetch-3F">#need_to_fetch?</a>
    <li ><a href="#method-i-resolved_revision">#resolved_revision</a>
    <li ><a href="#method-i-setup-21">#setup!</a>
    <li ><a href="#method-i-sh-21">#sh!</a>
    <li ><a href="#method-i-to_lockfile">#to_lockfile</a>
    <li ><a href="#method-i-versions">#versions</a>
    <li ><a href="#method-i-write_metadata">#write_metadata</a>
  </ul>
</div>

      </div>
     </div>
    </nav>


    <div id='extraz'><div class='adzbox-index'  >
      
     </div>         
    </div>

    <main role="main" aria-labelledby="class-RBS::Collection::Sources::Git">
    <h1 id="class-RBS::Collection::Sources::Git" class="class">
      class RBS::Collection::Sources::Git
    </h1>

    <section class="description">
    
    </section>

      <section id="5Buntitled-5D" class="documentation-section">


      <section class="constants-list">
      <header>
      <h3>Constants</h3>
      </header>
      <dl>
          <dt id="METADATA_FILENAME">METADATA_FILENAME
          <dd>
        </dl>
        </section>

        <section class="attribute-method-details" class="method-section">
        <header>
        <h3>Attributes</h3>
        </header>

          <div id="attribute-i-name" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">name</span><span
                class="attribute-access-type">[R]</span>
            </div>

            <div class="method-description">
              
              </div>
            </div>
          <div id="attribute-i-remote" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">remote</span><span
                class="attribute-access-type">[R]</span>
            </div>

            <div class="method-description">
              
              </div>
            </div>
          <div id="attribute-i-repo_dir" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">repo_dir</span><span
                class="attribute-access-type">[R]</span>
            </div>

            <div class="method-description">
              
              </div>
            </div>
          <div id="attribute-i-revision" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">revision</span><span
                class="attribute-access-type">[R]</span>
            </div>

            <div class="method-description">
              
              </div>
            </div>
            </section>


                <section id="public-class-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Public Class Methods</h3>
                </header>

                  <div id="method-c-new" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">new</span><span
                                class="method-args">(name:, revision:, remote:, repo_dir:)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="new-source">
            <pre><span class="ruby-comment"># File rbs-3.2.1/lib/rbs/collection/sources/git.rb, line 18</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>(<span class="ruby-value">name:</span>, <span class="ruby-value">revision:</span>, <span class="ruby-value">remote:</span>, <span class="ruby-value">repo_dir:</span>)
  <span class="ruby-ivar">@name</span> = <span class="ruby-identifier">name</span>
  <span class="ruby-ivar">@remote</span> = <span class="ruby-identifier">remote</span>
  <span class="ruby-ivar">@repo_dir</span> = <span class="ruby-identifier">repo_dir</span> <span class="ruby-operator">||</span> <span class="ruby-string">&#39;gems&#39;</span>
  <span class="ruby-ivar">@revision</span> = <span class="ruby-identifier">revision</span>
  <span class="ruby-ivar">@need_setup</span> = <span class="ruby-keyword">true</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

                <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Public Instance Methods</h3>
                </header>

                  <div id="method-i-has-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">has?</span><span
                                class="method-args">(name, version)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="has-3F-source">
            <pre><span class="ruby-comment"># File rbs-3.2.1/lib/rbs/collection/sources/git.rb, line 26</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">has?</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">version</span>)
  <span class="ruby-identifier">setup!</span> <span class="ruby-keyword">do</span>
    <span class="ruby-keyword">if</span> <span class="ruby-identifier">version</span>
      (<span class="ruby-identifier">gems_versions</span>[<span class="ruby-identifier">name</span>] <span class="ruby-operator">||</span> <span class="ruby-constant">Set</span>[]).<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">version</span>)
    <span class="ruby-keyword">else</span>
      <span class="ruby-identifier">gems_versions</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-identifier">name</span>)
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-install" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">install</span><span
                                class="method-args">(dest:, name:, version:, stdout:)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="install-source">
            <pre><span class="ruby-comment"># File rbs-3.2.1/lib/rbs/collection/sources/git.rb, line 43</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">install</span>(<span class="ruby-value">dest:</span>, <span class="ruby-value">name:</span>, <span class="ruby-value">version:</span>, <span class="ruby-value">stdout:</span>)
  <span class="ruby-identifier">setup!</span>()

  <span class="ruby-identifier">gem_dir</span> = <span class="ruby-identifier">dest</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">version</span>)

  <span class="ruby-keyword">case</span>
  <span class="ruby-keyword">when</span> <span class="ruby-identifier">gem_dir</span>.<span class="ruby-identifier">symlink?</span>
    <span class="ruby-identifier">stdout</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;Updating to #{format_config_entry(name, version)} from a local source&quot;</span>
    <span class="ruby-identifier">gem_dir</span>.<span class="ruby-identifier">unlink</span>
    <span class="ruby-identifier">_install</span>(<span class="ruby-value">dest:</span> <span class="ruby-identifier">dest</span>, <span class="ruby-value">name:</span> <span class="ruby-identifier">name</span>, <span class="ruby-value">version:</span> <span class="ruby-identifier">version</span>)
  <span class="ruby-keyword">when</span> <span class="ruby-identifier">gem_dir</span>.<span class="ruby-identifier">directory?</span>
    <span class="ruby-identifier">prev</span> = <span class="ruby-identifier">load_metadata</span>(<span class="ruby-value">dir:</span> <span class="ruby-identifier">gem_dir</span>)

    <span class="ruby-keyword">if</span> <span class="ruby-identifier">prev</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">metadata_content</span>(<span class="ruby-value">name:</span> <span class="ruby-identifier">name</span>, <span class="ruby-value">version:</span> <span class="ruby-identifier">version</span>)
      <span class="ruby-identifier">stdout</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;Using #{format_config_entry(name, version)}&quot;</span>
    <span class="ruby-keyword">else</span>
      <span class="ruby-identifier">stdout</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;Updating to #{format_config_entry(name, version)} from #{format_config_entry(prev[&quot;name&quot;], prev[&quot;version&quot;])}&quot;</span>
      <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">remove_entry_secure</span>(<span class="ruby-identifier">gem_dir</span>.<span class="ruby-identifier">to_s</span>)
      <span class="ruby-identifier">_install</span>(<span class="ruby-value">dest:</span> <span class="ruby-identifier">dest</span>, <span class="ruby-value">name:</span> <span class="ruby-identifier">name</span>, <span class="ruby-value">version:</span> <span class="ruby-identifier">version</span>)
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">when</span> <span class="ruby-operator">!</span><span class="ruby-identifier">gem_dir</span>.<span class="ruby-identifier">exist?</span>
    <span class="ruby-identifier">stdout</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;Installing #{format_config_entry(name, version)}&quot;</span>
    <span class="ruby-identifier">_install</span>(<span class="ruby-value">dest:</span> <span class="ruby-identifier">dest</span>, <span class="ruby-value">name:</span> <span class="ruby-identifier">name</span>, <span class="ruby-value">version:</span> <span class="ruby-identifier">version</span>)
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">raise</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-load_metadata" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">load_metadata</span><span
                                class="method-args">(dir:)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="load_metadata-source">
            <pre><span class="ruby-comment"># File rbs-3.2.1/lib/rbs/collection/sources/git.rb, line 226</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">load_metadata</span>(<span class="ruby-value">dir:</span>)
  <span class="ruby-comment"># @type var content: Hash[String, untyped]</span>
  <span class="ruby-identifier">content</span> = <span class="ruby-constant">YAML</span>.<span class="ruby-identifier">load_file</span>(<span class="ruby-identifier">dir</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">METADATA_FILENAME</span>).<span class="ruby-identifier">to_s</span>)
  <span class="ruby-identifier">_</span> = <span class="ruby-identifier">content</span>.<span class="ruby-identifier">slice</span>(<span class="ruby-string">&quot;name&quot;</span>, <span class="ruby-string">&quot;version&quot;</span>, <span class="ruby-string">&quot;source&quot;</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-manifest_of" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">manifest_of</span><span
                                class="method-args">(name, version)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="manifest_of-source">
            <pre><span class="ruby-comment"># File rbs-3.2.1/lib/rbs/collection/sources/git.rb, line 71</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">manifest_of</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">version</span>)
  <span class="ruby-identifier">setup!</span> <span class="ruby-keyword">do</span>
    <span class="ruby-identifier">path</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">repo_dir</span>, <span class="ruby-identifier">name</span>, <span class="ruby-identifier">version</span>, <span class="ruby-string">&#39;manifest.yaml&#39;</span>)
    <span class="ruby-identifier">content</span> = <span class="ruby-identifier">git</span>(<span class="ruby-string">&#39;cat-file&#39;</span>, <span class="ruby-string">&#39;-p&#39;</span>, <span class="ruby-node">&quot;#{resolved_revision}:#{path}&quot;</span>)
    <span class="ruby-constant">YAML</span>.<span class="ruby-identifier">safe_load</span>(<span class="ruby-identifier">content</span>)
  <span class="ruby-keyword">rescue</span> <span class="ruby-constant">CommandError</span>
    <span class="ruby-keyword">if</span> <span class="ruby-identifier">has?</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">version</span>)
      <span class="ruby-keyword">nil</span>
    <span class="ruby-keyword">else</span>
      <span class="ruby-identifier">raise</span>
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-metadata_content" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">metadata_content</span><span
                                class="method-args">(name:, version:)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="metadata_content-source">
            <pre><span class="ruby-comment"># File rbs-3.2.1/lib/rbs/collection/sources/git.rb, line 210</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">metadata_content</span>(<span class="ruby-value">name:</span>, <span class="ruby-value">version:</span>)
  {
    <span class="ruby-string">&quot;name&quot;</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">name</span>,
    <span class="ruby-string">&quot;version&quot;</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">version</span>,
    <span class="ruby-string">&quot;source&quot;</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">to_lockfile</span>
  }
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-resolved_revision" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">resolved_revision</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="resolved_revision-source">
            <pre><span class="ruby-comment"># File rbs-3.2.1/lib/rbs/collection/sources/git.rb, line 175</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">resolved_revision</span>
  <span class="ruby-ivar">@resolved_revision</span> <span class="ruby-operator">||=</span>
    <span class="ruby-keyword">begin</span>
      <span class="ruby-keyword">if</span> <span class="ruby-identifier">commit_hash?</span>
        <span class="ruby-identifier">revision</span>
      <span class="ruby-keyword">else</span>
        <span class="ruby-identifier">setup!</span> { <span class="ruby-identifier">git</span>(<span class="ruby-string">&#39;rev-parse&#39;</span>, <span class="ruby-node">&quot;refs/remotes/origin/#{revision}&quot;</span>).<span class="ruby-identifier">chomp</span> }
      <span class="ruby-keyword">end</span>
    <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-to_lockfile" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">to_lockfile</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="to_lockfile-source">
            <pre><span class="ruby-comment"># File rbs-3.2.1/lib/rbs/collection/sources/git.rb, line 111</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">to_lockfile</span>
  {
    <span class="ruby-string">&#39;type&#39;</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-string">&#39;git&#39;</span>,
    <span class="ruby-string">&#39;name&#39;</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">name</span>,
    <span class="ruby-string">&#39;revision&#39;</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">resolved_revision</span>,
    <span class="ruby-string">&#39;remote&#39;</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">remote</span>,
    <span class="ruby-string">&#39;repo_dir&#39;</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">repo_dir</span>,
  }
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-versions" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">versions</span><span
                                class="method-args">(name)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="versions-source">
            <pre><span class="ruby-comment"># File rbs-3.2.1/lib/rbs/collection/sources/git.rb, line 36</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">versions</span>(<span class="ruby-identifier">name</span>)
  <span class="ruby-identifier">setup!</span> <span class="ruby-keyword">do</span>
    <span class="ruby-identifier">versions</span> = <span class="ruby-identifier">gems_versions</span>[<span class="ruby-identifier">name</span>] <span class="ruby-keyword">or</span> <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;Git source `#{name}` doesn&#39;t have `#{name}`&quot;</span>
    <span class="ruby-identifier">versions</span>.<span class="ruby-identifier">sort</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-write_metadata" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">write_metadata</span><span
                                class="method-args">(dir:, name:, version:)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="write_metadata-source">
            <pre><span class="ruby-comment"># File rbs-3.2.1/lib/rbs/collection/sources/git.rb, line 218</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">write_metadata</span>(<span class="ruby-value">dir:</span>, <span class="ruby-value">name:</span>, <span class="ruby-value">version:</span>)
  <span class="ruby-identifier">dir</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">METADATA_FILENAME</span>).<span class="ruby-identifier">write</span>(
    <span class="ruby-constant">YAML</span>.<span class="ruby-identifier">dump</span>(
      <span class="ruby-identifier">metadata_content</span>(<span class="ruby-value">name:</span> <span class="ruby-identifier">name</span>, <span class="ruby-value">version:</span> <span class="ruby-identifier">version</span>)
    )
  )
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

                <section id="private-instance-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Private Instance Methods</h3>
                </header>

                  <div id="method-i-_install" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">_install</span><span
                                class="method-args">(dest:, name:, version:)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="_install-source">
            <pre><span class="ruby-comment"># File rbs-3.2.1/lib/rbs/collection/sources/git.rb, line 85</span>
        <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">_install</span>(<span class="ruby-value">dest:</span>, <span class="ruby-value">name:</span>, <span class="ruby-value">version:</span>)
  <span class="ruby-comment"># Should checkout that revision to support symlinks</span>
  <span class="ruby-identifier">git</span>(<span class="ruby-string">&quot;reset&quot;</span>, <span class="ruby-string">&quot;--hard&quot;</span>, <span class="ruby-identifier">resolved_revision</span>)

  <span class="ruby-identifier">dir</span> = <span class="ruby-identifier">dest</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">version</span>)
  <span class="ruby-identifier">dir</span>.<span class="ruby-identifier">mkpath</span>
  <span class="ruby-identifier">src</span> = <span class="ruby-identifier">gem_repo_dir</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">version</span>)

  <span class="ruby-identifier">cp_r</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">dir</span>)
  <span class="ruby-identifier">write_metadata</span>(<span class="ruby-value">dir:</span> <span class="ruby-identifier">dir</span>, <span class="ruby-value">name:</span> <span class="ruby-identifier">name</span>, <span class="ruby-value">version:</span> <span class="ruby-identifier">version</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-commit_hash-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">commit_hash?</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="commit_hash-3F-source">
            <pre><span class="ruby-comment"># File rbs-3.2.1/lib/rbs/collection/sources/git.rb, line 186</span>
        <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">commit_hash?</span>
  <span class="ruby-identifier">revision</span>.<span class="ruby-identifier">match?</span>(<span class="ruby-regexp">/\A[a-f0-9]{40}\z/</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-cp_r" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">cp_r</span><span
                                class="method-args">(src, dest)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="cp_r-source">
            <pre><span class="ruby-comment"># File rbs-3.2.1/lib/rbs/collection/sources/git.rb, line 97</span>
        <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">cp_r</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">dest</span>)
  <span class="ruby-constant">Find</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">src</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file_src</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">file_src</span> = <span class="ruby-constant">Pathname</span>(<span class="ruby-identifier">file_src</span>)

    <span class="ruby-comment"># Skip file if it starts with _, such as _test/</span>
    <span class="ruby-constant">Find</span>.<span class="ruby-identifier">prune</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">file_src</span>.<span class="ruby-identifier">basename</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">start_with?</span>(<span class="ruby-string">&#39;_&#39;</span>)

    <span class="ruby-identifier">file_src_relative</span> = <span class="ruby-identifier">file_src</span>.<span class="ruby-identifier">relative_path_from</span>(<span class="ruby-identifier">src</span>)
    <span class="ruby-identifier">file_dest</span> = <span class="ruby-identifier">dest</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">file_src_relative</span>)
    <span class="ruby-identifier">file_dest</span>.<span class="ruby-identifier">dirname</span>.<span class="ruby-identifier">mkpath</span>
    <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">copy_entry</span>(<span class="ruby-identifier">file_src</span>, <span class="ruby-identifier">file_dest</span>, <span class="ruby-keyword">false</span>, <span class="ruby-keyword">true</span>) <span class="ruby-keyword">unless</span> <span class="ruby-identifier">file_src</span>.<span class="ruby-identifier">directory?</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-format_config_entry" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">format_config_entry</span><span
                                class="method-args">(name, version)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="format_config_entry-source">
            <pre><span class="ruby-comment"># File rbs-3.2.1/lib/rbs/collection/sources/git.rb, line 121</span>
        <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">format_config_entry</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">version</span>)
  <span class="ruby-identifier">rev</span> = <span class="ruby-identifier">resolved_revision</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">10</span>]
  <span class="ruby-identifier">desc</span> = <span class="ruby-node">&quot;#{name}@#{rev}&quot;</span>

  <span class="ruby-node">&quot;#{name}:#{version} (#{desc})&quot;</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-gem_repo_dir" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">gem_repo_dir</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="gem_repo_dir-source">
            <pre><span class="ruby-comment"># File rbs-3.2.1/lib/rbs/collection/sources/git.rb, line 171</span>
        <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">gem_repo_dir</span>
  <span class="ruby-identifier">git_dir</span>.<span class="ruby-identifier">join</span> <span class="ruby-ivar">@repo_dir</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-gems_versions" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">gems_versions</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="gems_versions-source">
            <pre><span class="ruby-comment"># File rbs-3.2.1/lib/rbs/collection/sources/git.rb, line 232</span>
        <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">gems_versions</span>
  <span class="ruby-ivar">@gems_versions</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword">begin</span>
    <span class="ruby-identifier">repo_path</span> = <span class="ruby-constant">Pathname</span>(<span class="ruby-identifier">repo_dir</span>)

    <span class="ruby-identifier">paths</span> = <span class="ruby-identifier">git</span>(<span class="ruby-string">&#39;ls-tree&#39;</span>, <span class="ruby-string">&#39;--full-tree&#39;</span>, <span class="ruby-string">&#39;-dr&#39;</span>, <span class="ruby-string">&#39;--name-only&#39;</span>, <span class="ruby-string">&#39;-z&#39;</span>, <span class="ruby-identifier">resolved_revision</span>, <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">repo_dir</span>, <span class="ruby-string">&quot;&quot;</span>)).<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;\0&quot;</span>).<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span> <span class="ruby-constant">Pathname</span>(<span class="ruby-identifier">line</span>) }

    <span class="ruby-comment"># @type var versions: Hash[String, Set[String]]</span>
    <span class="ruby-identifier">versions</span> = {}

    <span class="ruby-identifier">paths</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">full_path</span><span class="ruby-operator">|</span>
      <span class="ruby-identifier">path</span> = <span class="ruby-identifier">full_path</span>.<span class="ruby-identifier">relative_path_from</span>(<span class="ruby-identifier">repo_path</span>)

      <span class="ruby-identifier">gem_name</span>, <span class="ruby-identifier">version</span> = <span class="ruby-identifier">path</span>.<span class="ruby-identifier">descend</span>.<span class="ruby-identifier">take</span>(<span class="ruby-value">2</span>)

      <span class="ruby-keyword">if</span> <span class="ruby-identifier">gem_name</span>
        <span class="ruby-identifier">versions</span>[<span class="ruby-identifier">gem_name</span>.<span class="ruby-identifier">to_s</span>] <span class="ruby-operator">||=</span> <span class="ruby-constant">Set</span>[]

        <span class="ruby-keyword">if</span> <span class="ruby-identifier">version</span>
          <span class="ruby-identifier">versions</span>[<span class="ruby-identifier">gem_name</span>.<span class="ruby-identifier">to_s</span>] <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">version</span>.<span class="ruby-identifier">basename</span>.<span class="ruby-identifier">to_s</span>
        <span class="ruby-keyword">end</span>
      <span class="ruby-keyword">end</span>
    <span class="ruby-keyword">end</span>

    <span class="ruby-identifier">versions</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-git" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">git</span><span
                                class="method-args">(*cmd, **opt)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="git-source">
            <pre><span class="ruby-comment"># File rbs-3.2.1/lib/rbs/collection/sources/git.rb, line 190</span>
        <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">git</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">cmd</span>, <span class="ruby-operator">**</span><span class="ruby-identifier">opt</span>)
  <span class="ruby-identifier">sh!</span> <span class="ruby-string">&#39;git&#39;</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">cmd</span>, <span class="ruby-operator">**</span><span class="ruby-identifier">opt</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-git-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">git?</span><span
                                class="method-args">(*cmd, **opt)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="git-3F-source">
            <pre><span class="ruby-comment"># File rbs-3.2.1/lib/rbs/collection/sources/git.rb, line 194</span>
        <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">git?</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">cmd</span>, <span class="ruby-operator">**</span><span class="ruby-identifier">opt</span>)
  <span class="ruby-identifier">git</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">cmd</span>, <span class="ruby-operator">**</span><span class="ruby-identifier">opt</span>)
<span class="ruby-keyword">rescue</span> <span class="ruby-constant">CommandError</span>
  <span class="ruby-keyword">nil</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-git_dir" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">git_dir</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="git_dir-source">
            <pre><span class="ruby-comment"># File rbs-3.2.1/lib/rbs/collection/sources/git.rb, line 161</span>
        <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">git_dir</span>
  <span class="ruby-ivar">@git_dir</span> <span class="ruby-operator">||=</span> (
    <span class="ruby-identifier">base</span> = <span class="ruby-constant">Pathname</span>(<span class="ruby-constant">ENV</span>[<span class="ruby-string">&#39;XDG_CACHE_HOME&#39;</span>] <span class="ruby-operator">||</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-string">&quot;~/.cache&quot;</span>))
    <span class="ruby-identifier">cache_key</span> = <span class="ruby-identifier">remote</span>.<span class="ruby-identifier">start_with?</span>(<span class="ruby-string">&#39;.&#39;</span>) <span class="ruby-operator">?</span> <span class="ruby-node">&quot;#{remote}\0#{Dir.pwd}&quot;</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">remote</span>
    <span class="ruby-identifier">dir</span> = <span class="ruby-identifier">base</span>.<span class="ruby-identifier">join</span>(<span class="ruby-string">&#39;rbs&#39;</span>, <span class="ruby-constant">Digest</span><span class="ruby-operator">::</span><span class="ruby-constant">SHA256</span>.<span class="ruby-identifier">hexdigest</span>(<span class="ruby-identifier">cache_key</span>))
    <span class="ruby-identifier">dir</span>.<span class="ruby-identifier">mkpath</span>
    <span class="ruby-identifier">dir</span>
  )
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-need_to_fetch-3F" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">need_to_fetch?</span><span
                                class="method-args">(revision)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="need_to_fetch-3F-source">
            <pre><span class="ruby-comment"># File rbs-3.2.1/lib/rbs/collection/sources/git.rb, line 150</span>
        <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">need_to_fetch?</span>(<span class="ruby-identifier">revision</span>)
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">true</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">commit_hash?</span>

  <span class="ruby-keyword">begin</span>
    <span class="ruby-identifier">git</span>(<span class="ruby-string">&#39;cat-file&#39;</span>, <span class="ruby-string">&#39;-e&#39;</span>, <span class="ruby-identifier">revision</span>)
    <span class="ruby-keyword">false</span>
  <span class="ruby-keyword">rescue</span> <span class="ruby-constant">CommandError</span>
    <span class="ruby-keyword">true</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-setup-21" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">setup!</span><span
                                class="method-args">() { || ... }</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="setup-21-source">
            <pre><span class="ruby-comment"># File rbs-3.2.1/lib/rbs/collection/sources/git.rb, line 128</span>
        <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">setup!</span>
  <span class="ruby-keyword">if</span> <span class="ruby-ivar">@need_setup</span>
    <span class="ruby-identifier">git_dir</span>.<span class="ruby-identifier">mkpath</span>
    <span class="ruby-keyword">if</span> <span class="ruby-identifier">git_dir</span>.<span class="ruby-identifier">join</span>(<span class="ruby-string">&#39;.git&#39;</span>).<span class="ruby-identifier">directory?</span>
      <span class="ruby-keyword">if</span> <span class="ruby-identifier">need_to_fetch?</span>(<span class="ruby-identifier">revision</span>)
        <span class="ruby-identifier">git</span> <span class="ruby-string">&#39;fetch&#39;</span>, <span class="ruby-string">&#39;origin&#39;</span>
      <span class="ruby-keyword">end</span>
    <span class="ruby-keyword">else</span>
      <span class="ruby-keyword">begin</span>
        <span class="ruby-comment"># git v2.27.0 or greater</span>
        <span class="ruby-identifier">git</span> <span class="ruby-string">&#39;clone&#39;</span>, <span class="ruby-string">&#39;--filter=blob:none&#39;</span>, <span class="ruby-identifier">remote</span>, <span class="ruby-identifier">git_dir</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-value">chdir:</span> <span class="ruby-keyword">nil</span>
      <span class="ruby-keyword">rescue</span> <span class="ruby-constant">CommandError</span>
        <span class="ruby-identifier">git</span> <span class="ruby-string">&#39;clone&#39;</span>, <span class="ruby-identifier">remote</span>, <span class="ruby-identifier">git_dir</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-value">chdir:</span> <span class="ruby-keyword">nil</span>
      <span class="ruby-keyword">end</span>
    <span class="ruby-keyword">end</span>

    <span class="ruby-ivar">@need_setup</span> = <span class="ruby-keyword">false</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-keyword">yield</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">block_given?</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-sh-21" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">sh!</span><span
                                class="method-args">(*cmd, **opt)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="sh-21-source">
            <pre><span class="ruby-comment"># File rbs-3.2.1/lib/rbs/collection/sources/git.rb, line 200</span>
        <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">sh!</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">cmd</span>, <span class="ruby-operator">**</span><span class="ruby-identifier">opt</span>)
  <span class="ruby-constant">RBS</span>.<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span> <span class="ruby-node">&quot;$ #{cmd.join(&#39; &#39;)}&quot;</span>
  <span class="ruby-identifier">opt</span> = { <span class="ruby-value">chdir:</span> <span class="ruby-identifier">git_dir</span> }.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">opt</span>).<span class="ruby-identifier">compact</span>
  (<span class="ruby-identifier">__skip__</span> = <span class="ruby-constant">Open3</span>.<span class="ruby-identifier">capture3</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">cmd</span>, <span class="ruby-operator">**</span><span class="ruby-identifier">opt</span>)).<span class="ruby-identifier">then</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">out</span>, <span class="ruby-identifier">err</span>, <span class="ruby-identifier">status</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">raise</span> <span class="ruby-constant">CommandError</span>, <span class="ruby-node">&quot;Unexpected status #{status.exitstatus}\n\n#{err}&quot;</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">status</span>.<span class="ruby-identifier">success?</span>

    <span class="ruby-identifier">out</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

              </section>
              </main>



            </div>  <!--  class='wrapper hdiv' -->


<footer id="validator-badges" role="contentinfo">
<p><a href="https://validator.w3.org/check/referer">Validate</a></p>
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.4.0.</p>
<p>Based on <a href="https://github.com/ged/darkfish/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.</p>

  
    <p><p><a href="https://ruby-doc.org">Ruby-doc.org</a> is provided by <a href="https://jamesbritt.com">James Britt</a> and <a href="https://neurogami.com">Neurogami</a>. </p><p><a href="https://jamesbritt.bandcamp.com/">Hack your world.  Feed your head.  Live curious</a>.</p>
</p>
  
  </footer>

<script type="text/javascript">


  let ads  = $("#carbonads-container").children().detach();


  function swapMode() {
    var cookieName = 'darkmode';
    var cssDarkmode = Cookies.get(cookieName);
    console.log("***** swapMode! " + cssDarkmode + " *****");


    if (cssDarkmode == "true") {
      console.log("We have dark mode, set the css to light ...");
      $('#rdoccss').attr("href", defaultModeCssHref);
      $('#cssSelect').text("Dark mode");
      cssDarkmode = "false";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    } else {
      console.log("We not have dark mode, set the css to dark ...");
      $('#rdoccss').attr("href", darkModeCsseHref);
      $('#cssSelect').text("Light mode");
      cssDarkmode = "true";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    }

    console.log("  --------------- ");
  }


const vueCssApp = new Vue({
el: '#menubar',
data: {
isDark: false
},
methods: {
toggleClass: function(event){
this.isDark = !this.isDark;
}
}
})

const vueApp = new Vue({
el: '#vapp',
data: { 
isOpen: true
},

mounted() {
this.handleResize();
this.manage_mob_classes();
window.addEventListener('resize', this.handleResize)
//this.isOpen !=  (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},
destroyed() {
window.removeEventListener('resize', this.handleResize)
},
created() {
//manage_mob_classes();
},

methods : {
isMobile() {
  return (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},

  handleResize() {
    if (!this.isMobile()) {
      this.isOpen = window.innerWidth > 800;
    }
  },

  manage_mob_classes() {
    if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
      $("nav").addClass("mob_nav");
      $("main").addClass("mob_main");
      $("#extraz").addClass("mob_extraz");
      $("#carbonads-container").addClass("mob_carbonads-container");
      this.isOpen  = false;
    } else {
      $("nav").removeClass("mob_nav") 
        $("main").removeClass("mob_main");
      $("#extraz").removeClass("mob_extraz");
      $("#carbonads-container").removeClass("mob_carbonads-container");
      this.isOpen  = true;
    }
  },

  toggleNav() {
    this.isOpen =! this.isOpen ;
    // alert("Toggle nav!");
    console.log("toggleNav() click: " + this.isOpen );
  }
}
})

$("#carbonads-container").append(ads);


$(function() {

    var darkmode = Cookies.get("darkmode");
    console.log("Document ready: " + darkmode);

    if ( darkmode  == "true" ) {
      $('#cssSelect').text("Light mode");
    } else {
      $('#cssSelect').text("Dark mode");
     }

    $('body').css('display','block');
    });

</script>

    
  </body> 
</html>

